package com.google.inject;

public class InternalContextPublic extends InternalContext {
	InternalContext context;

	public InternalContextPublic(InternalContext injector) {
		super(injector.injector);
		this.context = injector;
	}

	@Override
	<T> ConstructionContext<T> getConstructionContext(Object key) {
		return context.getConstructionContext(key);
	}

	@Override
	public Class<?> getExpectedType() {
		return context.getExpectedType();
	}

	@SuppressWarnings("unchecked")
	@Override
	public <T> ExternalContextPublic<T> getExternalContext() {
		ExternalContext<T> te = context.getExternalContext();
		return new ExternalContextPublic(te, te.getMember(), te
				.getParameterIndex(), (Key) te.getKey(), (InjectorImpl) te
				.getInjector());
	}

	@Override
	public InjectorImpl getInjectorImpl() {
		return context.getInjectorImpl();
	}

}
